<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>骨骼摆动</title>
    <link rel="shortcut icon" href="../lib/image/favicon.ico" type="image/x-icon">
    <link rel="stylesheet" href="../lib/css/all.css">

</head>
<style>
    .item-1 {
        width: 20px;
        height: 30px;
        background-color: #00FF5B;
        margin: auto;
    }

    .item-2 {
        width: 80px;
        height: 120px;
        background-color: #01E9FC;
        margin: auto;
    }

    .item-3 {
        width: 40px;
        height: 50px;
        background-color: #FFD200;
        margin: auto;
    }

    .animate-4 .s-1 {
        animation: swing4-1 5s ease-in-out infinite;
        transform: rotate(-2deg);
        transform-origin: top center;
    }

    .animate-4 .s-2 {
        animation: swing4-2 8s ease-in-out infinite;
        transform: rotate3d(0, 1, 0, 20deg);
        transform-origin: top center;
    }

    .animate-4 .s-3 {
        animation: swing4-3 8s ease-in-out infinite;
        transform: rotate(3deg);
        transform-origin: top center;
    }

    @keyframes swing4-1 {
        0% {
            transform: rotate(-2deg);
        }

        50% {
            transform: rotate(2deg);
        }

        100% {
            transform: rotate(-2deg);
        }
    }

    @keyframes swing4-2 {
        0% {
            transform: rotate3d(0, 1, 0, 20deg);
        }

        50% {
            transform: rotate3d(0, 1, 0, -20deg);
        }

        100% {
            transform: rotate3d(0, 1, 0, 20deg);
        }
    }

    @keyframes swing4-3 {
        0% {
            transform: rotate(3deg);
        }

        50% {
            transform: rotate(-3deg);
        }

        100% {
            transform: rotate(3deg);
        }
    }
</style>

<body>
    <div id="app">
        <div class="animate-4">
            <!--运动模块1-->
            <div class="s-1">
                <div class="item-1"></div>
                <!--运动模块2-->
                <div class="s-2">
                    <div class="item-2"></div>
                    <!--运动模块3-->
                    <div class="s-3">
                        <div class="item-3"></div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>

</html>